import { getRequest, postRequst } from "../../util/api";

/**
 *文章  接口
 **/



/**
 * 添加
 * @returns {Promise<AxiosResponse<T>>}
 */
export const addArticle = (param) => {
    return postRequst(param, "/article/addArticle");
};
/**
 * 修改
 * @returns {Promise<AxiosResponse<T>>}
 */
export const editArticle = (param) => {
    return postRequst(param, "/article/editArticle");
};


/**
 * 根据id查找
 * @returns {Promise<AxiosResponse<T>>}
 */
export const selectById = (param) => {
    return getRequest(param, "/article/getArticleById");
};
/**
 * 模糊查询
 * @returns {Promise<AxiosResponse<T>>}
 */
export const selectByKeyword = (param) => {
    return getRequest(param, "/article/getArticleByKeyword");
};

/**
 * 查找全部
 * @returns {Promise<AxiosResponse<T>>}
 */
export const getArticleAll = (param) => {
    return getRequest(param, "/article/getArticleAll");
};

/**
 * 删除   单个/全部
 * @returns {Promise<AxiosResponse<T>>}
 */
export const delArticle = (data) => {
    return postRequst(data, "/article/delArticle");
};



